#!/bin/bash

source "$(
  cd "$(dirname "$0")" || exit 1
  pwd
)/common.sh"

function main() {
  is_expected_architecture aarch64 || return 1
  set_script_dir || return 1
  conda_initialize "$1"
  create_and_activate_conda_env local || return 1
  local TEST_CASE_DIR
  TEST_CASE_DIR="${SCRIPT_DIR}/TestCase"
  local PRACTICAL_DIR
  PRACTICAL_DIR="${SCRIPT_DIR}/Practical"
  generate_execution_result_data "${PRACTICAL_DIR}" "${TEST_CASE_DIR}"
  if [[ $? -eq 0 ]]; then
    echo -e "\033[1;32;1mSuccessfully generated practical data.\033[0m"
  else
    echo -e "\033[1;31;1mFailed to generate practical data.\033[0m"
    delete_a_directory_or_file "${TEST_CASE_DIR}"
    delete_a_directory_or_file "${PRACTICAL_DIR}"
  fi
}

# /bin/bash ~/hpc/Anaconda/bioconda/kallisto/0.48.0/h0d531b0_1/test/generate_practical_data.sh /root/anaconda3
main "$@"
